Is is possible to guide installation of new programs using %ProgramFiles%? [closed]

Posted by ??????? ??????????? on Super User See other posts from Super User or by ??????? ???????????
Published on 2012-11-25T17:12:06Z Indexed on 2012/11/25 23:10 UTC
Read the original article Hit count: 137

Filed under:
|

The purpose of this is to have the default "program files" (32 and 64 bit) folders located under an arbitrary path, possibly on a drive separate from where windows lives.

Initially I thought that this may be done using a system environment variable through the dialog located under Control Panel -> System -> Advanced -> Environment Variables. These variables turned out to be set in the registry under the key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion. However, one particular entry is confusing. The ProgramFilesPath entry seems to point at an environment variable that is not defined under the same registry key.

I could assume that the difference between ProgramFilesDir and ProgramFilesPath is none and that one of them exists as a backwards compatibility, but having some legitimate resource from Microsoft to look at would be better than guessing.

After receiving some worrying feedback about having both 32 and 64bit applications in the same folder, I have decided not to ask about the feasibility of this to avoid discussion.

The real question is if the desired effect is possible to attain by "cutting into" the windows setup process and modifying those registry entries as early as possible. These settings should be system wide and not only for software installed by a particular user. If this is indeed something that can be done, I wonder if there are any subtle pitfalls.

Programs that expect libraries and other resources to be in default locations can probably be dealt with using the same technique as employed by Windows to re-map the "Documents and Settings" folders and the like (i.e. breaking legacy applications is not real concern).

© Super User or respective owner

Related posts about windows-7

Related posts about installation